#include "Polygone.h"
#include <iostream>

namespace sffs {

// Constructor()
Polygone::Polygone()
{
	m_Shape.AddPoint(0.0f, 0.0f, m_Color, sf::Color(0,0,0)) ;
	m_Shape.AddPoint(0.0f, 0.0f, m_Color, sf::Color(0,0,0)) ;
	m_Shape.AddPoint(0.0f, 0.0f, m_Color, sf::Color(0,0,0)) ;
	m_Shape.EnableFill(true) ;
	m_Shape.SetColor(m_Color) ;
	m_Shape.EnableOutline(true) ;
	m_Shape.SetOutlineWidth(0.0f) ;
}

// Constructor(pair<float,float>, pair<float,float>, pair<float,float>, sf::Color)
Polygone::Polygone(const std::vector<std::pair<float, float>>& _cornerVector, const sf::Color& _Color)
	: m_Color(_Color)
{
	for(unsigned int i=0;i< _cornerVector.size();i++)
	{
		m_Shape.AddPoint(_cornerVector[i].first, _cornerVector[i].second, _Color, sf::Color(0,0,0));
	}
	m_Shape.EnableFill(true) ;
	m_Shape.SetColor(m_Color) ;
	m_Shape.EnableOutline(true) ;
	m_Shape.SetOutlineWidth(0.0f) ;
}

Polygone::Polygone(const std::vector<std::pair<float, float> >& _cornerVector, const std::vector<sf::Color>& _ColorVector )
{
	// Question 3b
}

// Destructor
Polygone::~Polygone()
{
}

// SetColor
void Polygone::SetColor(int _R, int _G, int _B)
{
	// Question 3b
}

// Draw
void Polygone::Draw() const
{
	Polygone::m_Window->Draw(m_Shape) ;
}

// ChangeColor
void Polygone::ChangeColor(int newTime)
{
	// Question 3b
}

} // namespace sffs
